home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993 April: Penguin on DISC / ADC Developer CD (1993-04) (''Penguin On DISC'')_iso / Dev.CD Apr 93.iso / Utilities / MPW Interfaces 7.1 Beta / AIncludes / Private.a < prev    next >
Encoding:
Text File  |  1992-08-28  |  24.3 KB  |  544 lines  |  [TEXT/MPS ]

  1. ; Version: 2.83
  2. ; Created: Monday, September 25, 1989 at 10:38:59 AM
  3. ;
  4. ; File: Private.a
  5. ;
  6. ; Assembler Interface to the Macintosh Libraries
  7. ; Copyright Apple Computer, Inc. 1986-1992
  8. ; All Rights Reserved
  9. ;
  10. ;
  11. ; The following information was formerly in "private" files that were
  12. ; not released to the general developer community.
  13. ;
  14. ; The information in this file is not needed for normal application
  15. ; development. These equates and macros were necessary for development
  16. ; of the Macintosh ToolBox and Operating System, and are likely to be
  17. ; dependent on their current implementation. Use of any information
  18. ; in this file is likely to cause your software to fail on future
  19. ; versions of Macintosh system software or hardware.
  20. ;
  21. ; Apple Developer Support will not support any use of the following
  22. ; information.
  23. ;
  24. ; In order to prevent any "accidental" use of this information, it has
  25. ; been disabled using the conditional-assembly variable defined below.
  26. ; If you change this to a non-zero value, you're on your own.
  27. ;___________________________________________________________________________
  28.  
  29.     IF &TYPE('__IncludingPrivate__') = 'UNDEFINED' THEN
  30. __IncludingPrivate__    SET    1
  31.  
  32.                   IF          (&TYPE('PrNonPortable') = 'UNDEFINED') THEN
  33. PrNonPortable     EQU         0
  34.                   ENDIF
  35.  
  36.                   IF          PrNonPortable THEN
  37.  
  38.  
  39. ;_______________________________________________________________________
  40. ;
  41. ; System Equates -- These equates supplement the low-level equates for the
  42. ; Macintosh hardware and software defined in SysEqu. These equates are private
  43. ; to Apple Computer, Inc. and should be used solely for building system
  44. ; software.
  45. ;
  46. ;_______________________________________________________________________
  47.  
  48. ;+ Hardware Address Equates (for 512K through 128K Macs)
  49.  
  50. ; Unpacked, user versions of parameter ram
  51.  
  52. SdEnable          EQU         $261                      ; Sound enabled? [byte]
  53.  
  54. ; Event Record Definition
  55.  
  56. evtMax            EQU         $1E                       ; maximum number of events in buffer
  57.  
  58. ; Heap Zone header
  59.  
  60. spare1            EQU         $2C                       ; unused spare [long]
  61.  
  62.  
  63. ; Mouse/Keyboard
  64.  
  65. Tocks             EQU         $173                      ; Lisa sub-tick count [byte]
  66.  
  67. ;Chooser
  68.  
  69. ChooserBits       EQU         $946                      ; bit 7 = 0, don't run; bit 6 = 0, gray out Appletalk
  70.  
  71.  
  72.  
  73. ; Driver Status record definition
  74.  
  75. dsQType           EQU         $A                        ; not used [word]
  76. dsNeedsFlush      EQU         $13                       ; reserved [byte]
  77.  
  78. ;This variable was named RetryCount in SONYEqu
  79.  
  80. SONYRetry         EQU         5
  81. SonyVars          EQU         $134                      ; 3-1/2 disk driver vars [pointer]
  82. DskRtnAdr         EQU         $124                      ; temp for disk driver [pointer]
  83. PollRtnAddr       EQU         $128                      ; 'other' driver locals [pointer]
  84. PWMValue          EQU         $138                      ; current PWM value [word]
  85. PollStack         EQU         $13A                      ; SCC poll data start stack location [pointer]
  86. PollProc          EQU         $13E                      ; SCC poll data procedure [pointer]
  87. DiskVars          EQU         $222                      ; Disk driver variables [62 bytes]
  88.  
  89.  
  90. LastPGlobal       EQU         $954                      ; address of last printer global
  91.  
  92. ; QuickDraw Glue Vectors
  93.  
  94. JHideCursor     EQU         $800
  95. JShowCursor     EQU         $804
  96. JShieldCursor    EQU         $808
  97. JScrnAddr        EQU         $80C
  98. JScrnSize        EQU         $810
  99. JInitCrsr        EQU         $814
  100. JSetCrsr        EQU         $818
  101. JCrsrObscure    EQU         $81C
  102. JUpdateProc     EQU         $820
  103. LGrafJump        EQU         $824
  104. JSwapFont        EQU         $8E0                    ; jump entry for FMSwapFont [long]
  105. JFontInfo        EQU         $8E4                    ; jump entry for FMFontMetrics [long]
  106.  
  107. ; Miscellaneous Globals
  108.  
  109. SysCom            EQU         $100                      ; start of system communication area
  110. DispatchTab       EQU         $400                      ; A-Trap dispatch table [1024 bytes]
  111. OSTable           EQU         $0400                     ; 256 longs, up to $800, where old table of 512 words was
  112. toolDisp          EQU         10                        ; bit #10 distinguishes Tool/OS Get/Set Trap address
  113. oldDisp           EQU         9                         ; bit #9 distinguishes Old/New trap numbering
  114. ; moved HeapStart equate to hwequ file <C1/14Apr86>
  115. ; moved DoEject equate to hwequ file <C1/14Apr86>
  116.  
  117. JShell            EQU         $212                      ; journaling shell state [wprd]
  118. MacJmp            EQU         $120                      ; MACSBUG jumptable [pointer]
  119. MacJmpFlag        EQU            $BFF                    ; MacsBug flag [byte]                    <v1.6>
  120. FileVars          EQU         $340                      ; file system vars [184 bytes]
  121. LoadVars          EQU         $900                      ; loader variables [68 bytes]
  122. LastLGlobal       EQU         $944                      ; address past last loader global
  123. CoreEditVars      EQU         $954                      ; core edit variables [12 bytes]
  124. ScreenVars        EQU         $292                      ; Screen driver variables [8 bytes]
  125. SoundVars         EQU         $262                      ; Sound driver variables [32 bytes]
  126. BootGlobPtr        equ            $DDC                    ; ptr to BootGlobs record at top of memory <2.9><3.2><3.3>
  127.  
  128. ;_______________________________________________________________________
  129. ;
  130. ; Toolbox Equates -- These equates supplement the high-level equates for the
  131. ; Macintosh toolbox software in ToolEqu.a. These equates are private
  132. ; to Apple Computer, Inc. and should be used solely for building system
  133. ; software.
  134. ;
  135. ;_______________________________________________________________________
  136.  
  137. DeskPort          EQU         $9E2                      ; Desk grafPort (Whole screen) [pointer]
  138.  
  139. ;_______________________________________________________________________
  140. ;
  141. ; QuickDraw Equates -- This file supplements the public equates for QuickDraw.
  142. ; found in the file QuickEqu.a These equates are private
  143. ; to Apple Computer, Inc. and should be used solely for building system
  144. ; software.
  145. ;
  146. ;_______________________________________________________________________
  147.  
  148. symbols           EQU         0
  149. forMac            EQU         1
  150.  
  151. ;for Mac+ Only - 2-way comm cmd
  152.  
  153. rDSync            EQU         0                         ; sync up w/each other
  154.  
  155. ; command byte from nub to MPS
  156.  
  157. rDSysErr          EQU         1                         ; system error
  158. rDTrapCall        EQU         2                         ; trap call
  159. rDDta             EQU         3                         ; data comin' down the road
  160.  
  161. ; command byte from MPS to nub
  162.  
  163. rDGetN            EQU         1                         ; GetNBytes
  164. rDSetN            EQU         2                         ; SetNBytes
  165. rDCallProc        EQU         3                         ; CallProc
  166. rDSetAtrap        EQU         4                         ; SetATrap
  167. rDResume          EQU         5                         ; Resume execution
  168.  
  169. ; end Mac+ only
  170.  
  171.  
  172. FlEvtMask         EQU         $25E                      ; (word) mask of allowable events to flush at FlushEvents.
  173. TrapAgain         EQU         $B00                      ; use 4 bytes here for another trap
  174. PWMBuf1           EQU         $B0A                      ; (long) PWM buffer ptr
  175. BootMask          EQU         $B0E                      ; (word) needed during boot
  176. AtalkHk1          EQU         $B14                      ; (long) Appletalk hook
  177. AtalkHk2          EQU         $B18                      ; (long) Appletalk hook
  178. UnSwitchedFlags    equ            $B20                    ; (byte) special flags, not switched by multifinder <3.3>
  179. usRelTaskRun    equ            7                        ;        bit 7=1 if Reliability Mgr mtbf task NOT installed <3.3>
  180. SwitchedFlags    equ            $B21                    ; (byte) special flags, switched by multifinder        <3.3>
  181. SCSIFlag          EQU         $B22                      ; (word) Configuration Flag for SCSI
  182. HWCfgFlags        EQU         SCSIFlag                  ; (word) HW Configuration flags
  183. ; bit 15 - SCSI port present
  184. ; bit 14 - New Clock Chip Present
  185. ; bit 13 - Extra Parameter Ram Valid at boottime.
  186.  
  187. BtDskRfn          EQU         $B34                      ; (word) refnum for boot drive driver refnum
  188. BootTmp8          EQU         $B36                      ; (8bytes) temp space needed by StartBoot
  189. T1Arbitrate       EQU         $B3F                      ; (byte) $FF if Timer T1 up for grabs.
  190. RMGRHiVars        EQU         $B80                      ; $B80-$BFF are switched vars
  191. ; RMGR vars extend $B80 through $B9F
  192.  
  193. NewUnused         EQU         $BC0                      ; (word) - used to be FlEvtMask
  194. FmtDefaults       EQU         52+$36A                   ; ptr to formatting defs (TFSVars + 52) [long]
  195.  
  196. ; addresses of TE hooks installed in trap table
  197.  
  198. TETrimMeasure     EQU         (4*253+OSTable)           ; trimMeasure hook
  199. TEFindLine        EQU         (4*255+OSTable)           ; findLine hook
  200. JBlockMove        EQU         $4B8                      ; Special equate for OUR HeapGuts Jump Table
  201. JInsTime          EQU         (600-512)*4+OSTable       ;
  202. JRmvTime          EQU         (601-512)*4+OSTable       ;
  203. JPrimeTime        EQU         (602-512)*4+OSTable       ;
  204. JADBop            EQU            ($7C*4)+OSTable            ; OS trap table entry for _ADBop
  205. JIOPMsgRequest    EQU            ($87*4)+OSTable            ; OS trap table entry for _IOPMsgRequest
  206. JLg2Phys          EQU         (703-512)*4+OSTable       ;
  207. JFlushCache       EQU         (704-512)*4+OSTable       ;
  208. JGetBlock         EQU         (705-512)*4+OSTable       ;
  209. JMarkBlock        EQU         (706-512)*4+OSTable       ;
  210. JRelBlock         EQU         (707-512)*4+OSTable       ;
  211. JTrashBlocks      EQU         (708-512)*4+OSTable       ;
  212. JTrashVBlks       EQU         (709-512)*4+OSTable       ;
  213. JCacheWrIP        EQU         (710-512)*4+OSTable       ;
  214. JCacheRdIP        EQU         (711-512)*4+OSTable       ;
  215.  
  216.  
  217. JBasicIO          EQU         (712-512)*4+OSTable       ;
  218. JRdBlocks         EQU         (713-512)*4+OSTable       ;
  219. JWrBlocks         EQU         (714-512)*4+OSTable       ;
  220. JSetUpTags        EQU         (715-512)*4+OSTable       ;
  221. JBTClose          EQU         (716-512)*4+OSTable       ;
  222. JBTDelete         EQU         (717-512)*4+OSTable       ;
  223. JBTFlush          EQU         (718-512)*4+OSTable       ;
  224. JBTGetRecord      EQU         (719-512)*4+OSTable       ;
  225. JBTInsert         EQU         (720-512)*4+OSTable       ;
  226. JBTOpen           EQU         (721-512)*4+OSTable       ;
  227. JBTSearch         EQU         (722-512)*4+OSTable       ;
  228. JBTUpdate         EQU         (723-512)*4+OSTable       ;
  229. JGetNode          EQU         (724-512)*4+OSTable       ;
  230. JRelNode          EQU         (725-512)*4+OSTable       ;
  231. JAllocNode        EQU         (726-512)*4+OSTable       ;
  232. JFreeNode         EQU         (727-512)*4+OSTable       ;
  233. JExtBTFile        EQU         (728-512)*4+OSTable       ;
  234. JDeallocFile      EQU         (729-512)*4+OSTable       ;
  235. JExtendFile       EQU         (730-512)*4+OSTable       ;
  236. JTruncateFile     EQU         (731-512)*4+OSTable       ;
  237. JCMSetUp          EQU         (732-512)*4+OSTable       ;
  238. JDtrmV1           EQU         (734-512)*4+OSTable       ;
  239. JBlkAlloc         EQU         (735-512)*4+OSTable       ;
  240. JBlkDeAlloc       EQU         (736-512)*4+OSTable       ;
  241. JFileOpen         EQU         (737-512)*4+OSTable       ;
  242. JPermssnChk       EQU         (738-512)*4+OSTable       ;
  243. JFndFilName       EQU         (739-512)*4+OSTable       ;
  244. JRfNCall          EQU         (740-512)*4+OSTable       ;
  245. JAdjEOF           EQU         (741-512)*4+OSTable       ;
  246.  
  247. JFileClose        EQU            (745-512)*4+OSTable        ; $7a4    <dnf v2.6>
  248. JFileRead        EQU            (746-512)*4+OSTable        ; $7a8    <dnf v2.6>
  249. JFileWrite        EQU            (747-512)*4+OSTable        ; $7ac    <dnf v2.6>
  250.  
  251. JClkNoMem         EQU         (595-512)*4+OSTable       ;vector for clock
  252.  
  253.  
  254. JSegStack         EQU         (760-512)*4+OSTable       ;vector for segment loader
  255.  
  256. ; vectors for RMGR low levels routines
  257. JSuperLoad        EQU         (761-512)*4+OSTable       ;
  258. JCmpFrm           EQU         (762-512)*4+OSTable       ;
  259. JNewMap           EQU         (763-512)*4+OSTable       ;
  260. JCheckLoad        EQU         (764-512)*4+OSTable       ;
  261.  
  262. JRMgrStdEntry    EQU            ($A6*4)+OSTable            ;vector for standard entry routine
  263. JRMgrStdExit    EQU            ($A7*4)+OSTable            ;vector for standard exit routine
  264.  
  265.  
  266. ;_______________________________________________________________________
  267. ;
  268. ; heap flags
  269.  
  270. checking          EQU         0                         ;check arguments and data structures
  271. statistics        EQU         0                         ;gather statistics on usage
  272. robust            EQU         0                         ;enables super-robust internal checks
  273. countMPs          EQU         0                         ;enables counting of master pointers
  274. dfltFlags         EQU         0                         ;Checking is on when zone is init'd
  275. nOSTable          EQU         $0400                     ; 256 longs, up to $800
  276. JMtCheck          EQU         ($AF)*4+nOSTable          ; ($A0AF) $0400 is n/OSTable
  277. JCheckReMount     EQU         ($B0)*4+nOSTable          ; ($A0B0) $0400 is n/OSTable
  278. JDtrmV2           EQU         ($B1)*4+nOSTable          ; ($A0B1) $0400 is n/OSTable
  279. JFindDrive        EQU         ($B2)*4+nOSTable          ; ($A0B2) $0400 is n/OSTable
  280. JFClose           EQU         ($B3)*4+nOSTable          ; ($A0B3) $0400 is n/OSTable
  281. JFlushMDB         EQU         ($B4)*4+nOSTable          ; ($A0B4) $0400 is n/OSTable
  282. JGoDriver         EQU         ($B5)*4+nOSTable          ; ($A0B5) $0400 is n/OSTable
  283. JWaitUntil        EQU         ($B6)*4+nOSTable          ; ($A0B6) $0400 is n/OSTable
  284. JSyncWait         EQU         ($B7)*4+nOSTable          ; ($A0B7) $0400 is n/OSTable
  285. JSoundDead        EQU         ($B8)*4+nOSTable          ; ($A0B8) $0400 is n/OSTable
  286. JDisptch          EQU         ($B9)*4+nOSTable          ; ($A0B9) $0400 is n/OSTable
  287. ;JStartinit EQU ($B9)*4+nOSTable ; ($A0B9) $0400 is n/OSTable <C681><C811>
  288. JIAZInit          EQU         ($BA)*4+nOSTable          ; ($A0BA) $0400 is n/OSTable
  289. JIAZPostInit      EQU         ($BB)*4+nOSTable          ; ($A0BB) $0400 is n/OSTable
  290. JLaunchInit       EQU         ($BC)*4+nOSTable          ; ($A0BC) $0400 is n/OSTable
  291. JCacheFlush       EQU         ($BD)*4+nOSTable          ; ($A0BD) $0400 is n/OSTable
  292. JStripAddress    EQU            ($55)*4+nOSTable        ; ($A055) $0400 is n/OSTable        <v1.7>
  293. JjSwapMMU        EQU            ($5D)*4+nOSTable        ; ($A05D) $0400 is n/OSTable        <v2.1>
  294. JTranslate24to32 EQU        ($91)*4+nOSTable        ; ($A091) $0400 is n/OSTable        <v3.4>
  295. XToolTable        EQU            ($99)*4+nOSTable        ; ($A099) $0400 is n/OSTable        <11>
  296.  
  297. ;_______________________________________________________________________
  298. ;
  299. ; addresses of TE hooks installed in trap table for new color text edit <C144>
  300.  
  301. JPixel2Char       EQU         (742-512)*4+nOSTable      ; ($A0E6) $0400 is nOSTable
  302. JChar2Pixel       EQU         (743-512)*4+nOSTable      ; ($A0E7) $0400 is nOSTable
  303. JHiliteText       EQU         (744-512)*4+nOSTable      ; ($A0E8) $0400 is nOSTable
  304.  
  305. ;_______________________________________________________________________
  306. ;
  307. ;tfs vectors <A281>
  308.  
  309. JUpdAltMDB      EQU         ($ED)*4+nOSTable          ; ($A0ED) $0400 is n/OSTable
  310. JCkExtFS          EQU         ($EE)*4+nOSTable          ; ($A0EE) $0400 is n/OSTable
  311. JDTrmV3           EQU         ($EF)*4+nOSTable          ; ($A0EF) $0400 is n/OSTable
  312. JBMChk            EQU         ($F0)*4+nOSTable          ; ($A0F0) $0400 is n/OSTable
  313. JTstMod           EQU         ($F1)*4+nOSTable          ; ($A0F1) $0400 is n/OSTable
  314. JLocCRec          EQU         ($F2)*4+nOSTable          ; ($A0F2) $0400 is n/OSTable
  315. JTreeSearch       EQU         ($F3)*4+nOSTable          ; ($A0F3) $0400 is n/OSTable
  316. JMapFBlock        EQU         ($F4)*4+nOSTable          ; ($A0F4) $0400 is n/OSTable
  317. JXFSearch         EQU         ($F5)*4+nOSTable          ; ($A0F5) $0400 is n/OSTable
  318. JReadBM           EQU         ($F6)*4+nOSTable          ; ($A0F6) $0400 is n/OSTable
  319.  
  320. bcMask            EQU         $00FFFFFF                 ; Mask for the 24 bit Byte Count
  321. GrafBegin         EQU         $800                      ; graf global area
  322. GrafEnd           EQU         $8F2                      ; end of graphics globals
  323.  
  324.  
  325. ; Offsets into boot blocks
  326.  
  327. bbID              EQU         0                         ; (word) offset to boot blocks ID
  328. bbEntry           EQU         2                         ; (contains BRA.S) entrypoint to boot blocks
  329. bbVersion         EQU         6                         ; (word) version number
  330. bbPageFlags       EQU         8                         ; (word) page 2 usage flags
  331. bbSysName         EQU         $0A                       ; system resource code file name (byte length + 0-15 chars)
  332. bbShellName       EQU         $1A                       ; system shell file name ('Finder')
  333. bbDbg1Name        EQU         $2A                       ; debugger file name (first load)
  334. bbDbg2Name        EQU         $3A                       ; debugger file name (second load)
  335. bbScreenName      EQU         $4A                       ; boot screen file name
  336. bbHelloName       EQU         $5A                       ; startup program file name
  337. bbScrapName       EQU         $6A                       ; system scrap file name
  338. bbCntFCBs         EQU         $7A                       ; (word) # of FCBs to allocate (determines max open files)
  339. bbCntEvts         EQU         $7C                       ; (word) # of event queue elements to allocate
  340. bb128KSHeap       EQU         $7E                       ; size of system heap on a 128K Mac (no longer used)
  341. bb256KSHeap       EQU         $82                       ; size of system heap on a 256K Mac (no longer used)
  342. bb512KSHeap       EQU         $86                       ; size of system heap on a 512K Mac
  343. bbSysHeapSize     EQU         $86                       ; (long) absolute size of the system heap (for all machines).
  344. ; (word) unused - reserved
  345. bbSysHeapExtra    EQU         $8C                       ; (long) minimum additional system heap space required.
  346. bbSysHeapFract    EQU         $90                       ; (long) fraction of memory available to be used for sys heap.
  347.  
  348.  
  349. ; The version number of the boot blocks affects the interpretation of the system heap size:
  350. ;
  351. ; if (BBVersion) <= BBOldVers then
  352. ; System heap size becomes DefSysHeapSize (see HWEqu).
  353. ;
  354. ; if BBOldVers < (BBVersion) < BBNewVers then
  355. ; if (BBVersion) = execBBvers then
  356. ; Executes boot blocks starting at BBEntry.
  357. ; System heap size becomes (BBSysHeapSize) (if it isn't already bigger).
  358. ;
  359. ; if BBNewBit is set in (BBVersion) then
  360. ; if BBExecBit is set then
  361. ; Executes boot blocks starting at BBEntry.
  362. ; if BBRelBit is cleared then
  363. ; System heap size becomes (BBSysHeapSize) (if it isn't already bigger)
  364. ; if BBRelBit is set then
  365. ; System heap is extended by BBSysHeapExtra + (BBSysHeapFract * (MemTop))
  366.  
  367. ; Values for boot blocks.
  368. bbOldVers         EQU         $14                       ; really old versions of boot blocks are <= this
  369. bbOldExecVers     EQU         'D'                       ; old version for executable boot blocks
  370.  
  371. ; Bits for new boot blocks:
  372. bbNewBit          EQU         7                         ; set to indicate the use of the new format
  373. bbExecBit         EQU         6                         ; set to indicate dispatchable boot blocks
  374. bbRelBit          EQU         5                         ; set to indicate relative heap size specification
  375. ; bits 4 through 0 are reserved for future use by Apple and must be cleared.
  376.  
  377. ; Corresponding values
  378. bbNewMask         EQU         $80                       ; new boot blocks use #'s >= this
  379. bbExecMask        EQU         $40                       ;
  380. bbRelMask         EQU         $20                       ;
  381.  
  382. ;----------------------------------------------
  383. ; Power Manager Data Structures
  384.  
  385. pmCommand         EQU         0                         ;Power manager parameter block
  386. pmLength          EQU         pmCommand+2               ;Power manager parameter block
  387. pmSBuffer         EQU         pmLength+2                ;Power manager parameter block
  388. pmRBuffer         EQU         pmSBuffer+4               ;Power manager parameter block
  389. pmData            EQU            pmRBuffer+4
  390. pmBlkSize        EQU            pmData+4
  391.  
  392. ; Power Manager Commands
  393.  
  394. powerCntl         EQU         $10               ;Power Manager parameter block - Power/clock control
  395. powerRead         EQU         $18               ;Power Manager parameter block - Power/clock control
  396. pMgrADB           EQU         $20               ;Power Manager parameter block - Apple Desktop Bus
  397. pMgrADBoff       EQU         $21               ;Power Manager parameter block - Apple Desktop Bus
  398. readADB           EQU         $28               ;Power Manager parameter block - Apple Desktop Bus
  399. pMgrADBInt        EQU         $2F               ;Power Manager parameter block - Apple Desktop Bus
  400. timeWrite         EQU         $30               ;Power Manager parameter block - Clock/parameter ram
  401. pramWrite         EQU         $31               ;Power Manager parameter block - Clock/parameter ram
  402. xPramWrite        EQU         $32               ;Power Manager parameter block - Clock/parameter ram
  403. timeRead          EQU         $38               ;Power Manager parameter block - Clock/parameter ram
  404. pramRead          EQU         $39               ;Power Manager parameter block - Clock/parameter ram
  405. xPramRead         EQU         $3A               ;Power Manager parameter block - Clock/parameter ram
  406. contrast          EQU         $40               ;Power Manager parameter block - Screen contrast control
  407. modemSet          EQU         $50               ;Power Manager parameter block - Internal modem setup
  408. modemRead          EQU         $58               ;Power Manager parameter block - Internal modem setup
  409. batteryRead       EQU         $68               ;Power Manager parameter block - Battery/charger level and status
  410. batteryNow       EQU         $69               ;Power Manager parameter block - Battery/charger instantaneous level and status
  411. SetOneSecInt    EQU            $70                ;Power Manager parameter block - set one-second interrupt        <t3> djw
  412. PmgrPWRoff      EQU         $7E               ;Power Manager parameter block - Power off
  413. sleepReq          EQU         $7F               ;Power Manager parameter block - Sleep request
  414. readINT           EQU         $78               ;Power Manager parameter block - Read power manager interrupt flag register
  415. sleepAck          EQU         $70               ;Power Manager parameter block - Sleep acknowledge
  416. timerSet          EQU         $80               ;Power Manager parameter block - Wake Up Timer
  417. timerRead          EQU         $88               ;Power Manager parameter block - Wake Up Timer
  418. soundSet        EQU            $90               ;Power Manager parameter block - Sound power control
  419. SetDFAC            EQU            $91               ;Power Manager parameter block - Set DFAC register
  420. soundRead        EQU            $98               ;Power Manager parameter block - Sound power state
  421. ReadDFAC        EQU            $99               ;Power Manager parameter block - Read DFAC register
  422. resetCPU        EQU            $D0               ;Power Manager parameter block - Reset the CPU
  423. readAtoD          EQU         $D8               ;Power Manager parameter block - Read A/D channel
  424. writePmgrRAM    EQU            $E0               ;Power Manager paramater block - Write to internal PMgr Ram
  425. readPmgrRAM        EQU            $E8               ;Power Manager parameter block - Read the internal PMgr Ram
  426. readPmgrVers    EQU            $EA                   ;Power Manager parameter block - Read the power manager version number
  427. PmgrSelfTest    EQU            $EC               ;Power Manager parameter block - Power Manager Self Test
  428. PmgrSoftReset    EQU            $EF               ;Power Manager parameter block - Soft Reset of the Power Manager
  429. sleepSig        EQU            'MATT'            ;Sleep signature word
  430.  
  431.  
  432. ;Power control/clock equates (command $10)
  433.  
  434. iwmOn             EQU         $81                       ;Disk controller clock
  435. iwmOff            EQU         $01                       ;Disk controller clock
  436. sccOn             EQU         $82                       ;SCC chip clock
  437. sccOff            EQU         $02                       ;SCC chip clock
  438. hdOn             EQU         $84                       ;Hard disk power
  439. hdOff            EQU         $04                       ;Hard disk power
  440. modemOn         EQU         $88                       ;Internal modem power
  441. modemOff        EQU         $08                       ;Internal modem power
  442. serOn             EQU         $90                       ;Serial output drivers power
  443. serOFF            EQU         $10                       ;Serial output drivers power
  444. sndLtchClear      EQU         $A0                       ;Sound latch clear
  445. sndLtchRelease     EQU         $20                       ;Sound latch release
  446. minus5on          EQU         $C0                       ;Minus 5 volts power
  447. minus5off         EQU         $40                       ;Minus 5 volts power
  448. ascOn             EQU         $A0                       ;Sound chip clock and analog power
  449. ascOff            EQU         $20                       ;Sound chip clock and analog power
  450. alloff            EQU            $5B                        ;Turn off everything except hard disk, sound latch ready
  451. soundOff        EQU            $00                        ;Sound power off
  452. soundOn            EQU            $02                        ;Sound power on
  453. sndClrLtch        EQU            $02                           ;Sound power on, clear sound power latch
  454. sndOnClrLtch    EQU            $03                        ;Sound power on, clear sound power latch
  455.  
  456. ;Interrupt flag register usage (command $78)
  457.  
  458. adbIntFlag        EQU         0                         ;ADB data ready
  459. batIntFlag        EQU         1                         ;Low BATtery power
  460. envIntFlag        EQU         2                         ;ENVironmental problem
  461.  
  462. ;Batter/Charger status bits
  463.  
  464. HasCharger        EQU            0                        ;Charger connected
  465. ShortedBat        EQU            2                        ;Shorted battery condition
  466. LowBattery        EQU            4                        ;Low battery condition
  467. ChrgState        EQU            5                        ;Charger connection state change
  468. OverTemp        EQU            6                        ;High temperature condition
  469.  
  470. ;Modem command bits                                    ;                                            <4.3>
  471. ModemPwr        EQU            0                        ;Modem power control (1=true)
  472. ModemAorB        EQU            1                        ;Modem connection to port A or B (1=A)
  473. RingWakeEnable    EQU            2                        ;Modem ring detect wake up enable (1=true)
  474. ModemInstalled    EQU            3                        ;Modem in the slot (1=true)
  475. RingDetect        EQU            4                        ;Modem ring detect pin (1=ringing)
  476. ModemHook        EQU            5                        ;Modem on/off hook (1=off hook)
  477.  
  478. ;SerialPower bits and bytes
  479. BypassModem        EQU            0                        ;Ignore pram internal modem designation (1=ignore)
  480. PortAorB        EQU            2                        ;Port A or Port B (1=port A)
  481. SerialOff        EQU            7                        ;Power on/off selector bit
  482.  
  483. PortAPower        EQU            4                        ;Power port A command (byte version of PortAorB)
  484. PortBPower        EQU            0                        ;Power port B command
  485.  
  486. ;Power manager loopcounts
  487. wait8us           EQU         $40                       ;For software loop, remove later
  488. BootDevTicks    EQU            2*60*60                    ; Wait for boot device before sleep, in ticks.
  489.  
  490.  
  491. ; equates for dynamic menuList structure
  492. ;
  493. ;----- Part 1 -- regular menus
  494. mbResID           EQU         4                         ; menuBar variant offset in menuList [word]
  495. menu1Size         EQU         mbResID + 2               ; Must be = 6 forever!!!
  496.  
  497. ;----- Part 2 -- hierarchical menus
  498. lastHMenu         EQU         0                         ; offset in HMenu part of dynamic menuList [word]
  499. menuTitleSave     EQU         lastHMenu + 2             ; handle to saved bits behind title rectangle [handle]
  500. menu2Size         EQU         menuTitleSave+4           ; size of HMenu entry
  501. menuHoH           EQU         0                         ; hierarchical menu [handle]
  502.  
  503. ;----- Size of menuList at InitMenus time -- no menus, no hierarchical menus
  504. initMListSize     EQU         menu1Size + menu2Size
  505. ; equates for mbarproc's save structure created when it receives Init Msg (Msg #3)
  506. ;
  507. ;----- Header
  508. lastMBSave        EQU         0                         ; offset to last menu saved in structure [word]
  509. mbCustomStorage   EQU         lastMBSave + 2            ; private storage for custom mbarproc's [handle]
  510. mbItemRect        EQU         mbCustomStorage + 4       ; rect of currently chosen menu item [rect]
  511. mbMenuDelay       EQU         mbItemRect + 8            ; get MenuDelay from paramram and store here [byte]
  512. mbMenuDrag        EQU         mbMenuDelay + 1           ; get MenuDrag from paramram and store here [byte]
  513. mbUglyScroll      EQU         mbMenuDrag + 1            ; flag to tell whether HMenu has been brought [word]
  514. ; before scrolling happens
  515. mbIconState       EQU         mbUglyScroll + 2          ; Place to save NMgr icon state
  516. mbHeader          EQU         mbIconState + 2           ; size of mb save header [$14]
  517. ; !!!!! CAUTION: mbHeader MUST be smaller than mbEntrySize !!!!!
  518.  
  519. ;----- Entry
  520. mbRectSave        EQU         0                         ; rectangle of menu on screen [8 bytes]
  521. mbBitsSave        EQU         mbRectSave + 8            ; handle to saved bits behind menu rectangle
  522. mbMenuDir         EQU         mbBitsSave + 4            ; direction menu was placed on screen,
  523. ; to right or left of title (if first menu) 
  524. ; or previous menu (if hierarchical menu)
  525. mbMLOffset        EQU         mbMenuDir + 2             ; 6 byte offset of menu in menuList [word]
  526. mbMLHandle        EQU         mbMLOffset + 2            ; handle of menu in menuList
  527. mbTopScroll       EQU         mbMLHandle + 4            ; top scrolled to menu item, from global topMenuItem [word]
  528. mbBotScroll       EQU         mbTopScroll + 2           ; bottom scrolled to menu item, from global atMenuBottom [word]
  529. mbReserved        EQU         mbBotScroll + 2           ; reserved field [long]
  530. mbEntrySize       EQU         mbReserved + 4
  531. mbSaveSize        EQU         mbEntrySize*6             ; x-byte header and 5 entries of x-bytes each
  532. firstAltMenuCmd   EQU         $1B
  533. altMenuCmd1       EQU         $1D                       ; itemCmd == $1D ==> unused indicator reserved for future Apple use
  534. altMenuCmd2       EQU         $1E                       ; itemCmd == $1E ==> unused indicator reserved for future Apple use
  535. altMenuCmd3       EQU         $1F                       ; itemCmd == $1F ==> unused indicator reserved for future Apple use
  536. lastAltMenuCmd    EQU         $1F
  537. mbRightDir        EQU         0                         ; menu went to the right (direction)
  538. mbLeftDir         EQU         1                         ; menu went to the left (direction)
  539. menuDelay         EQU         $7E                       ; param ram locations for user settable
  540. menuDrag          EQU         $7F                       ; hierarchical menu delay and drag ticks
  541.  
  542.                   ENDIF                                 ;end exclusion of private information
  543.  
  544.     ENDIF    ; ...already included